package com.learn.swagger.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Positive;
import java.io.Serializable;

/**
 * 基类
 *
 * @author zhousiqi
 * @version 1.0.0
 * @date 2019/2/26 13:22
 */
@Data
@ApiModel(value = "基类", description = "基类的描述信息")
public class Base implements Serializable {
    private static final long serialVersionUID = 1939173804588015735L;

    @ApiModelProperty(value = "id", required = true)
    @Positive(message = "id必须为整数")
    private Long id;

    @ApiModelProperty(value = "名称", required = true)
    @NotEmpty(message = "名称不能为空")
    private String name;
}
